package com.zjcode.cdcer.controller;

import com.chinatechstar.component.commons.controller.BaseController;
import com.chinatechstar.component.commons.result.ListResult;
import com.chinatechstar.component.commons.result.ResultBuilder;
import com.chinatechstar.component.commons.supports.PageData;
import com.zjcode.cdcer.model.basic.JsonObj;
import com.zjcode.cdcer.service.CerGastroscopeDiagnosisCollectInfoService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName:CerGastroscopeDiagnosisCollectInfoController
 * @功能：胃镜诊疗汇总信息
 * @author：yang
 * @日期：2022/7/27-00:56
 **/
@RestController
@Slf4j
@RequestMapping("/v1/gastroscopestatistics/")
public class CerGastroscopeDiagnosisCollectInfoController extends BaseController {

    @Autowired
    private CerGastroscopeDiagnosisCollectInfoService diagnosisCollectInfoService;

    @PostMapping("listPageData")
    @ApiOperation("获取所有的胃镜诊疗汇总信息列表")
    public JsonObj listPageData() {
        return diagnosisCollectInfoService.listPageData(getPageData());
    }

    @PostMapping("findByOrgIdAndUploadYear")
    @ApiOperation("点击查看胃镜诊疗汇总信息详情")
    public JsonObj findByOrgIdAndUploadYear() {
        return diagnosisCollectInfoService.findByOrgIdAndUploadYear(getPageData());
    }

    @PostMapping("changStatus")
    @ApiOperation("改变状态")
    public JsonObj changStatus() {
        return diagnosisCollectInfoService.changStatus(getPageData());
    }
}
